1. Technical Field
The present invention relates to a clock device and a computer-readable record medium storing a program for implementing a clock device.
2. Related Art
Clock devices capable of acquiring time information representing the present time from an external device and correcting its own time (the time kept by the clock device) based on the acquired time information, are well known today. Specifically, clock devices acquiring the time information from a time server via a network are widely known.
In a well-known technology for a clock device for acquiring the time information from an external device and correcting its own time based on the acquired time information, the timing for acquiring the time information is controlled based on the error of the time kept by the clock device with respect to the present time represented by the time information acquired from the external device. For example, a technology shortening the time interval of the acquisition of the time information when the error is large and a technology extending the time interval when the error is small are widely known.
However, the conventional technology involves the following problems:
For example, in a technology for a clock device acquiring the time information from a time server at fixed time intervals and correcting its own time based on the acquired time information, the error of an internal clock of the clock device can become extremely large in cases where the timekeeping accuracy of the internal clock is lower than an estimated accuracy since the clock device makes the time correction at fixed time intervals based on the estimated time accuracy of the internal clock irrespective of the error of the internal clock.
Further, in cases where an internal clock whose timekeeping accuracy is unstable (e.g. software clock) is corrected, it is impossible to precisely predict the extent of the error occurring with the passage of time, and thus it is difficult to properly set the time interval for the acquisition of the time information.
In other words, the time information acquisition interval has to be set at a short time so that the error of the internal clock can be kept within a permissible range even when the timekeeping accuracy of the internal clock is at its worst (since the extent of the error occurring with the passage of time can not be predicted precisely). In this case, the load on the time server or the network can become extremely heavy.
Even though there exists a technology adjusting the time interval for the acquisition of the time information from the time server based on the error of the internal clock, the conventional technology (making a simple adjustment like just shortening the time interval when the error is large and extending the time interval when the error is small) is incapable of stabilizing the error of the internal clock, and consequently, the time information acquisition interval is necessitated to change frequently.